'use strict'
import React, {Component} from 'react'
import $ from 'jquery'
import GoodBoard from './GoodBoard'
import { Link } from 'react-router'

class MallColumn extends Component {
    render() {
        const { title, color, listType, goodList, setExchangeModalData } = this.props;
        let borderClass = 'board-title-border ' + color,
            linkTo = {pathname:'/good_page/'+ listType};
        return (
            <section className="mall-column-board">
                <div className="board-header clearfix">
                    <h3 className="board-title pull-left"><span className={borderClass}></span>{title}</h3>
                    <div className="board-menu pull-right"><Link to={linkTo} className="lnk">更多</Link></div>
                </div>
                <div className="board-body">
                    <GoodBoard data={goodList} setExchangeModalData={setExchangeModalData} />
                </div>
            </section>
        );
    }
}

export default MallColumn;